using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace Backend.JYD.AModel.Models.Mapping
{
    public class PayPlanMap : EntityTypeConfiguration<PayPlan>
    {
        public PayPlanMap()
        {
            // Primary Key
            this.HasKey(t => t.PlanId);

            // Properties
            // Table & Column Mappings
            this.ToTable("PayPlan");
            this.Property(t => t.PlanId).HasColumnName("PlanId");
            this.Property(t => t.PayDate).HasColumnName("PayDate");
            this.Property(t => t.PayAmount).HasColumnName("PayAmount");
            this.Property(t => t.Status).HasColumnName("Status");
            this.Property(t => t.IsValid).HasColumnName("IsValid");
            this.Property(t => t.WarningDay).HasColumnName("WarningDay");
            this.Property(t => t.LessMoney).HasColumnName("LessMoney");
            this.Property(t => t.TermNum).HasColumnName("TermNum");
            this.Property(t => t.IsLastPlan).HasColumnName("IsLastPlan");
        }
    }
}
